"""**10.3 GUI布局管理**
1)pack()
2)grid()"""

#一、pack()布局管理,上下布局（流式）
# import tkinter as tk
# root=tk.Tk()
# root.title("pack()布局管理")
# root.geometry("400x300")
# button1=tk.Button(root,text="按钮1")
# button2=tk.Button(root,text="按钮2")
# button3=tk.Button(root,text="按钮3")
# button4=tk.Button(root,text="按钮4")
# button1.pack()
# button2.pack()
# button3.pack()
# button4.pack()
# root.mainloop()

#网络布局grid
import tkinter as tk
root=tk.Tk()
root.title("pack()布局管理")
root.geometry("400x300")
button1=tk.Button(root,text="按钮1")
button2=tk.Button(root,text="按钮2")
button3=tk.Button(root,text="按钮3")
button4=tk.Button(root,text="按钮4")
button1.grid(row=0,column=0)
button2.grid(row=0,column=1)
button3.grid(row=0,column=2)
button4.grid(row=0,column=3)
root.mainloop()

